package com.yellowpage.wf.data;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * WorkflowInstance entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WF_WORKFLOW_INSTANCE")
public class WorkflowInstance implements java.io.Serializable {

	// Fields

	private Long workflowInstanceId;
	private Long workflowId;
	private Long workflowNodeId;
	private String status;
	private Long owner;
	private Long createUser;
	private Date createTime;
	private Long lastUpdateUser;
	private Date lastUpdateTime;
	private String name;

	// Constructors

	/** default constructor */
	public WorkflowInstance() {
	}

	/** full constructor */
	public WorkflowInstance(Long workflowId, Long workflowNodeId,
			String status, Long owner, Long createUser, Date createTime,
			Long lastUpdateUser, Date lastUpdateTime, String name) {
		this.workflowId = workflowId;
		this.workflowNodeId = workflowNodeId;
		this.status = status;
		this.owner = owner;
		this.createUser = createUser;
		this.createTime = createTime;
		this.lastUpdateUser = lastUpdateUser;
		this.lastUpdateTime = lastUpdateTime;
		this.name = name;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "WORKFLOW_INSTANCE_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getWorkflowInstanceId() {
		return this.workflowInstanceId;
	}

	public void setWorkflowInstanceId(Long workflowInstanceId) {
		this.workflowInstanceId = workflowInstanceId;
	}

	@Column(name = "WORKFLOW_ID", precision = 18, scale = 0)
	public Long getWorkflowId() {
		return this.workflowId;
	}

	public void setWorkflowId(Long workflowId) {
		this.workflowId = workflowId;
	}

	@Column(name = "WORKFLOW_NODE_ID", precision = 18, scale = 0)
	public Long getWorkflowNodeId() {
		return this.workflowNodeId;
	}

	public void setWorkflowNodeId(Long workflowNodeId) {
		this.workflowNodeId = workflowNodeId;
	}

	@Column(name = "STATUS", length = 16)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "OWNER", precision = 18, scale = 0)
	public Long getOwner() {
		return this.owner;
	}

	public void setOwner(Long owner) {
		this.owner = owner;
	}

	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "LAST_UPDATE_USER", precision = 18, scale = 0)
	public Long getLastUpdateUser() {
		return this.lastUpdateUser;
	}

	public void setLastUpdateUser(Long lastUpdateUser) {
		this.lastUpdateUser = lastUpdateUser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "LAST_UPDATE_TIME", length = 7)
	public Date getLastUpdateTime() {
		return this.lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	@Column(name = "NAME", length = 500)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

}